<%@ page import="br.softwaresolutions.virtualstore.dao.DaoProdutos,
    br.softwaresolutions.virtualstore.model.Categoria,
    br.softwaresolutions.virtualstore.util.Utils, java.util.List" %>

<%
List categorias = DaoProdutos.getInstance().getCategorias();
%>

<table align="center">
    <tr> 
        <td><img src="<%=request.getContextPath() %>${initParam['imageDir']}logo_ss.gif" width="359" height="45"></td>
        <td width="411">&nbsp;</td>
    </tr>
    <tr> 
        <td width="359"><img src="<%=request.getContextPath() %>${initParam['imageDir']}leftbar.gif" width="359" height="39"></td>
        <td align="right" bgcolor="336CA1">
            <table width="200" border="0" cellspacing="0" cellpadding="0">
                <form action="<%= request.getContextPath()%>/AdminServlet" method="get" name="frm">
                    <input type="hidden" name="metodo" value="search">
                    <tr>
                        <td width="60"><img src="<%=request.getContextPath() %>${initParam['imageDir']}busca.jpg" width="54" height="24" alt="BUSCAR:"/></td>
                        <td width="84"><input  name="param" type="textfield" size="14"></td>
                        <td width="84">
                            <select name="categoria">
                                <option value="0" selected>:::::categoria:::::</option>
                                <%
                                if(categorias != null){
                                    int size = categorias.size();
                                    for(int i = 0; i<size ;i++){
                                        Categoria cat= (Categoria) categorias.get(i);
                                %>
                                <option value="<%= cat.getId()%>">::: <%= cat.getNome()%> :::</option>
                                <%
                                    }
                                }
                                %>
                            </select>                                        
                        </td>
                        <td width="55">
                           <input name="Submit" type="image" src="<%=request.getContextPath() %>${initParam['imageDir']}go.gif" width="30" height="24">
                        </td>
                        <td width="5">&nbsp;</td>
                    </tr>
                </form>
            </table>
        </td>
    </tr>
    <tr> 
        <td colspan="2"><img src="<%=request.getContextPath() %>${initParam['imageDir']}topbar.gif" width="770" height="69"></td>
    </tr>
</table>
